package com.elminster.dao.common;

import java.io.Serializable;
import java.util.List;

public interface IGenericDao <T, PK extends Serializable> {
    
    public void save(T t);
    
    public T find(PK pk);
    
    public List<T> findAll();
    
    public List<T> findByExample(T t);
    
    public List<T> findByHql(String hql, Object[] params);
    
    public void update(T t);
    
    public void delete(T t);
    
    public int getTotalCount();
    
    public T merge(T t);
    
    public void attachDirty(T t);
    
    public void attachClean(T t);
}
